This chapter describes the 3D Viewer, which provides a high-level interface for displaying 3D objects and other data in a window and allowing users limited interaction with those objects. You can use the functions described here to present 3D data (stored either in a file or in memory) to users quickly and easily. The 3D Viewer provides controls with which the user can manipulate several aspects of the displayed data, such as the point of view.
The 3D Viewer allows you to display 3D data from metafiles (or memory) with minimal programming effort. It is analogous to the movie controller provided with QuickTime, which lets you display and control movies with little custom programming. You must specify at least one geometric object to the 3D Viewer, but it can supply default objects for other parts of the 3D environment such as the camera, lights, and renderer.
To use this chapter, you should already be familiar with the basic capabilities of QuickDraw 3D, as described in the first sections of the chapter "Introduction to QuickDraw 3D" elsewhere in this document.
If your application needs more advanced rendering or interaction capabilities, or if you want to allow users to create and manipulate objects dynamically, you can use the lower-level QuickDraw 3D application programming interfaces instead of, or in addition to, the higher-level 3D Viewer programming interfaces.
The 3D Viewer supports the same platforms as the QuickDraw 3D library. Two versions of the 3D Viewer library are available: one to support the PowerPC version of the Mac OS and another to support the Win32 API (running on either Windows 95 or the Intel processor version of Windows NT 3.51 and later). The two different versions of the viewer have similar programming interfaces and can be used similarly.
Note, however, that the two different versions of the 3D Viewer are intimately tied to the target platform through dependencies on each platform's base graphics libraries, their window management systems, and their event handling architectures. As a result, the programming interfaces are not identical; some functions and constants are unique to one platform or the other, and many of the functions take different parameters. Because of these necessary differences, the two libraries have different symbolic namespaces. The Mac OS version of the 3D Viewer uses function names beginning with Q3Viewer (for example, Q3ViewerNew ), as in QuickDraw 3D version 1.0. The Win32 version of the 3D Viewer uses names beginning with Q3WinViewer (for example: Q3WinViewerNew ).
This chapter has different sections discussing using the 3D Viewer on Mac OS and on Win32. The following Mac OS and Win32 reference sections describe the Mac OS and Win32 viewer routines respectively.
QD3D Book | Chapter Contents | Next |